package com.lovo.hb.dao;

import com.lovo.hb.entity.StudentEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface IStudentDao extends CrudRepository<StudentEntity,Long> {
    @Query("from StudentEntity stu where stu.teacher.teacherName=?1")
    public List<StudentEntity> findAllByTeacherName(String name);
}
